<script>
	import {
		getToken
	} from '@/utils/token'
	import {
		getInfo
	} from '@/api/system/user'

	export default {
		onLaunch: function() {},
		onShow: function() {
			// 检查是否登录
			this.checkToken();
		},
		methods: {
			checkToken() {
				if (!getToken()) {
					console.log("未登录！")
					uni.reLaunch({
						url: '/pages/login/index'
					})
				}
			}
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>